<script setup>
import { ref } from 'vue';
import { useStore } from '@/store';

const store = useStore();
const system = uni.getSystemInfoSync();
// #ifdef APP
const platform = ref(plus.os.name);
const modelNumber = ref(plus.device.model);
const manufacturer = ref(plus.device.vendor);
// #endif
</script>

<template>
  <view class="version">
    <view>后台环境：{{ store.baseUrl }}</view>
    <view>前端环境：{{ store.NODE_ENV }}</view>
    <view>应用版本：{{ system.appWgtVersion || system.appVersion }}</view>
    <!-- #ifdef APP -->
    <view>运行平台：{{ platform }}</view>
    <view>设备厂商：{{ manufacturer }}</view>
    <view>设备型号：{{ modelNumber }}</view>
    <!-- #endif -->
  </view>
</template>

<style lang="scss" scoped>
.version {
  position: fixed;
  left: 24rpx;
  bottom: $uni-padding-bottom;
  z-index: 99;
  font-weight: 400;
  font-size: 24rpx;
  color: rgba(102, 102, 102, 1);
}
</style>
